/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package enumisomorph;

import java.util.Arrays;

/**
 *
 * @author Libra
 */
public class Pattern {

    private int[] p;
    private int[][] pp;

    Pattern(int[] in) {
        pp = new int[6][6];
        p = in;
        int[] q1 = {p[0], p[1], p[2], p[3], p[4], p[5]};
        int[] q2 = {p[0], p[1], p[4], p[5], p[2], p[3]};
        int[] q3 = {p[2], p[3], p[0], p[1], p[4], p[5]};
        int[] q4 = {p[2], p[3], p[4], p[5], p[0], p[1]};
        int[] q5 = {p[4], p[5], p[0], p[1], p[2], p[3]};
        int[] q6 = {p[4], p[5], p[2], p[3], p[0], p[1]};
        pp[0] = q1;
        pp[1] = q2;
        pp[2] = q3;
        pp[3] = q4;
        pp[4] = q5;
        pp[5] = q6;
    }

    boolean isoEqual(int[] in) {
        for (int i = 0; i < 6; i++) {
            if (Arrays.equals(pp[i], in)) {
                return true;
            }
        }
        return false;
    }

    int[] value() {
        return p;
    }

    void show() {
        for (int i = 0; i < 6; i++) {
            Group.dpp(p[i] + ",");
        }
        Group.dpp("\n");
    }
}